files = dir('*.JPG');
for k = 1:numel(files)
   rgb = imread(files(k).name);
   %rgb = rgb(1:1800, 520:2000, :);
   %rgb = imresize(rgb, 0.5, 'bicubic');
   rgb = imrotate(rgb, -90, 'bicubic');
   imwrite(rgb, ['cropped\' files(k).name]);
end